using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Text;
using BookDownloader.Core.Data;

namespace BookDownloader.Core.Implementation
{
    public class FantlabFileRatesProvider : FantlabRatesProviderBase
    {
        public FantlabFileRatesProvider(List<MappedBook> myBooks) : base(myBooks)
        {
        }

        protected override string LoadRawRates()
        {
            string path = ConfigurationManager.AppSettings["FantlabFilePath"];
            Encoding encode = Encoding.GetEncoding("windows-1251");

            var rd = new StreamReader(path, encode);
            string s = rd.ReadToEnd();
            return s;
        }
    }
}